<!DOCTYPE html>
<html>

<head>

    {include file="Public:header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
<!-- 标题 -->
<div class="page-heade">
    <h1 class="title_color">入库单确认</h1>
</div>
<!-- 标题 -->
<form action="#" class="form-inline">
    <table class="table table-bordered text-center bud_hei" style="margin-bottom: 0">
        <tr>
            <td style="min-width: 160px;width: 160px">申请人：</td>
            <td class="text-left"><a href="javascript:;">{$data.sqr}</a></td>
            <td style="min-width: 160px;width: 160px">申请人部门：</td>
            <td class="text-left">{$data.sqrbm}</td>
            <td style="min-width: 160px;width: 160px">申请日期：</td>
            <td class="text-left">{$data.sqsj}</td>
        </tr>
        <tr>
            <td style="min-width: 160px;width: 160px">确认人：</td>
            <td class="text-left"><a href="javascript:;">{$data.qrr}</a></td>
            <td style="min-width: 160px;width: 160px">确认人部门：</td>
            <td class="text-left">{$data.qrrbm}</td>
            <td style="min-width: 160px;width: 160px">确认日期：</td>
            <td class="text-left">{$data.qrsj}</td>
        </tr>
        <tr>
            <td style="min-width: 160px;width: 160px">入库方式：</td>
            <td class="text-left">{$data.rkfs}</td>
            <td style="min-width: 160px;width: 160px">物料类型：</td>
            <td class="text-left" colspan="3">{$data.lx}</td>
        </tr>
        <tr>
            <td style="min-width: 160px;width: 160px">入库仓库：</td>
            <td class="text-left" colspan="5">
                <select name="dyck" id="" class="form-control">
                    {volist name="ck" id="row" key="k"}
                    <option value="{$row.id}" {if $data.dyck==$row.id}selected{/if}>{$row.ckjc}</option>
                    {/volist}
                </select>
            </td>
        </tr>
        <tr>
            <td style="min-width: 160px;width: 160px">入库意见：</td>
            <td class="text-left" colspan="5">
                <input type="text" class="form-control" name="rkyj" id="rkyj" value="">
            </td>
        </tr>
    </table>
    <table class="table table-bordered text-center bud_hei">
        <tr class="info">
            <th class="text-center">序号</th>
            <th class="text-center">编号</th>
            <th class="text-center">名称</th>
            <th class="text-center">供应商</th>
            <th class="text-center">单位</th>
            <th class="text-center">单价(元)</th>
            <th class="text-center">申请数量</th>
            <th class="text-center">确认数量<span class="colorRed">*</span></th>
            <th class="text-center">金额(元)</th>
        </tr>
        {volist name="data.list" id="row" key="k"}
        <tr>
            <td>{$k+(request()->param('page')?request()->param('page'):1-1)*10}</td>
            <td><a href="xs_detail.html">{$row.wlbh}</a></td>
            <td class="text-left">{$row.wlmc}</td>
            <td>{$row.gys}</td>
            <td>{$row.unit}</td>
            <td class="text-right"><span class="ObjectNum">{$row.dj}</span>00</td>
            <td class="text-right"><span class="ObjectNum">{$row.sqsl}</span>00</td>
            <td><input type="text" class="form-control" name="qrsl[{$row.id}]" value="{$row.sqsl}"></td>
            <td class="text-right"><span class="ObjectNum">{$row.je}</span>00</td>
        </tr>
        {/volist}
        <tfoot>
        <tr class="text-right font-bold">
            <td colspan="6">小计：</td>
            <td class="ObjectNum">{$data.sqsl_xj}</td>
            <td class="ObjectNum">{$data.sqsl_xj}</td>
            <td class="ObjectNum">{$data.je_xj}</td>
        </tr>
        </tfoot>
    </table>
    <table class="table table-bordered" style="margin:1px 0">
        <td style="min-width: 160px;width: 160px">备注：</td>
        <td class="text-left">{$data.bz}</td>
    </table>
    <div class="padding-10 text-center">
        <button class="btn-info btn" type="button" id="qrrk">确认入库</button>
        <button class="btn btn-warning" type="button" onclick="back()">返回</button>
    </div>
</form>
<!--  <div class="SuccessImg font-bold">
   已&nbsp;生&nbsp;效
 </div> -->
{include file="Public:footer"}
<script>
    $(document).ready(function () {
        $('#qrrk').on('click',function () {
            var param = $(this).closest('form').serialize()
            $.post('',param,function (data) {
                if(data.success){
                    swal({title:data.msg},function () {
                        history.go(-1)
                    })
                }else{
                    swal('',data.msg,'warning')
                }
            },'json')
        })
        var $ObjectNum = $(".ObjectNum");
        toNum($ObjectNum);
    })
</script>
</body>

</html>
